const { Buffer } = require('node:buffer')

const memoryContainer = Buffer.alloc(4) // 4 bytes, 32 bits

memoryContainer[0] = 0xfe
memoryContainer[1] = 0x00
memoryContainer.writeInt8(-34, 2)
memoryContainer[3] = 0xff

console.log(memoryContainer)
console.log(memoryContainer[0])
console.log(memoryContainer[1])
console.log(memoryContainer.readInt8(2))
console.log(memoryContainer[3])

const buff = Buffer.from([0x48, 0x69, 0x21])
console.log(buff.toString('utf-8'))

const buff1 = Buffer.from('486921', 'hex')
console.log(buff1.toString('utf-8'))